<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="业务单打印" />
<%@ include file="../inc/PrintTitle.jsp"%>
<head>
<script src="/js/popup_ext.js"></script>
<script language="javascript">
	function doPrint(){
		ShowConfirm('确认框','确定开始打印吗？',340,80,"doPrintCallBack()");
	}
	function doPrintCallBack(){
		if(popRetVal!=null){
			document.getElementById("noPrinSpan").style.display="none";
			printContent("管理易-条形码","${enterpriseInfo.doPrint}","${enterpriseInfo.printWidth}",240);
			document.getElementById("noPrinSpan").style.display="";
		}
	}
	function doCancel(){
		window.close();
	}
</script>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/jquery-barcode.js"></script>
<script language="javascript">
	var settings = {
			output: "css",
          	showHRI: false,
          	bgColor: "#FFFFFF",
      		color: "#000000",
            fontSize: 9,			
          	barWidth: 1,
          	barHeight: 30
	};
	//var btype="code39";
	var btype="code128";
	function showBarcode(value,objName){
		$("#"+objName).html("").show().barcode(value, btype, settings);
	}
</script>
</head>
<body style="background-color:#FFFFFF">
<div style="height:4px">&nbsp;</div>
<table width="230" align="center" border="1" cellspacing="2" cellpadding="2" class="label_table">
	<tr>
		<td>
			<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" class="label_table">
		        <tr> 
		          <td align="center"><div id="barcodeTarget"></div></td>
		        </tr>
		        <tr> 
		          <td align="center" class="FontMedium" >${record.billCode}</td>
		        </tr>
		        <tr> 
		          <td class="FontMedium"><b>制作：</b><commonTag:cutString source="${est.estName}" subLength="26" appendString="..." /></td>
		        </tr>
		        <tr> 
		          <td class="FontMedium"><b>联系人：</b>${record.linkman}</td>
		        </tr>
		        <tr> 
		          <td class="FontMedium"><b>电话：</b>${record.phone}</td>
		        </tr>
		        <tr> 
		          <td class="FontMedium"><b>地址：</b><commonTag:cutString source="${record.address}" subLength="26" appendString="..." /></td>
		        </tr>
		        <tr> 
		          <td class="FontMedium"><b>摘要：</b><commonTag:cutString source="${record.content}" subLength="26" appendString="..." /></td>
		        </tr>
		        <tr> 
		          <td class="FontMedium"><b>交货：</b><c:if test="${record.deliverDate!=null}"><fmt:formatDate value="${record.deliverDate}" pattern="yyyy-MM-dd HH:mm"/></c:if></td>
		        </tr>
		        <tr> 
		          <td class="FontMedium"><b>打印：</b><fmt:formatDate value="${now}" pattern="yyyy-MM-dd HH:mm"/> ${currentUser.staffer.stafferName}</td>
		        </tr>
		      </table>
		</td>
	</tr>
</table>
<script language="javascript">
	showBarcode('${record.billCode}','barcodeTarget');
</script>
<table width="230" border="0" cellspacing="1" cellpadding="1" align="center" id="noPrinSpan">
	<tr>
		<td align="center" height="10">
			&nbsp;
		</td>	
	</tr>	
	<tr>
		<td align="center">
			<input type="button" id="printButton" class="Button" value="开始打印" onClick="doPrint();">
			<input type="button" id="cancelButton" class="Button" value=" 退 出 " onClick="doCancel();">
		</td>
	</tr>
</table>
</body>
</html>
